package com.weijianhuawen.wjblog.common.exception;

import lombok.Getter;
import lombok.Setter;
import org.springframework.stereotype.Service;

/**
 * @version: java version 8
 * @Author: weijianhuawen
 * @description: 自定义用户异常
 * @date: 2024-10-15 12:15
 */
@Getter
@Setter
public class UserException extends RuntimeException{
    // 异常码
    private String errorCode;
    // 错误信息
    private String errorMessage;

    public UserException(BaseExceptionInterface baseExceptionInterface) {
        this.errorCode = baseExceptionInterface.getErrorCode();
        this.errorMessage = baseExceptionInterface.getErrorMessage();
    }
}
